<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<input type="file" id="file" onchange="changeIt()">
		<img id="img" src=""/>
		<script>
			function changeIt(){
				var img = document.getElementById("img");
				var file = document.getElementById("file")
				var src = window.URL.createObjectURL(file.files[0]);
				console.log(src);
				img.src = src
			}
		</script>
	</body>
</html>